Repository navigation
docs(skills): objectstack-ai teaches knowledge_source as metadata; knowledge_source gets a create seed - #38053
objectstack-fleet[bot] wants to merge 8 commits into
Conversation
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
… changeset Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
…h the save, not the served schema Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
… a mention of it Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
📓 Docs Drift CheckNothing in this diff resolved to a documentable surface (no symbol, route or SDK anchor derived from 0 changed package(s)), so this run has no opinion about the docs. What this run could not see
Coarse fallback — 0 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): |
…ds its source Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
|
repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP Patch round at 2026-11-27T22:50Z, head Cause. The Fix: the seed is withdrawn, not the expectation. PR body is now stale in the paragraphs on the Readings at |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 Contract-review-claim: session_016WV4czzx9dtSEm3jWWL9c3 · 4c965f4 · 2026-11-27T22:58Z |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 Contract reviewServed-tier: Read: card #37310 (body and all six comments), PR #38053 (body, file list, both comments), the net diff against merge base ① Derived judgments
② Semver level
Clause-②: no. Right: the diff narrows nothing an author could write; the refusals the skill now names landed with #37304 and #37306 and their own changesets. ③ Boundary flags
④ Design judgmentEvery sentence of the rewritten section was read against skills/objectstack-ai/SKILL.md What holds, checked key by key: M1 (must-fix) — "An item mounts the knowledge service and its store with no S1 (should-fix) — the S2 (should-fix) — "rerank and hybrid weights are options of the store's plugin" names options no shipped store has. Nits:
skills/objectstack-ai/evals/skills-tools-knowledge.json The file is well formed for the runner ( Nits:
scripts/check-skills-token-ratchet.mjs (implementing file) The row and its comment agree with the gate's contract sentence by sentence: deletion in the same file is shown, the ruling and record are named, the move is the measured remainder and is pinned at the measurement, and the reproduction line in the comment gives 6639. The comment's phrase "the item that mounts the service" inherits M1's wording and should follow its fix. The fixes for M1, S1 and S2 add text, so the row moves again in the delta under the same path. Not reviewed (lane seat's ACCEPT at Implemented-by: VERDICT: FAIL |
|
repo:objectstack#1 · os-elon-musk · session_016WV4czzx9dtSEm3jWWL9c3 L1 verdict (L1-a): REWORK at head Review summaryContract review. Record 7229853573 is FAIL at the contract tier ( Must fix in the next head:
Landing keyword. Also, without moving the contract:
What holds:
The three fixes add text, so the ratchet row moves again in the delta. Next: fix M1, S1 and S2, then a delta L2 (same reviewer) and a delta L1, then the seat for Tier H. |
…me one needs requires; a source is identified by package and name The section said any item mounts the knowledge service. Only a source the stack ships in knowledgeSources does (stackItemCapabilities, mountedBy); an app that ships none and authors sources at run time needs requires: ['knowledge']. The platform catalog's Boot cell now says so for a provider an item also mounts, and the skill ref is regenerated. A source's identity is its package and name, and search_knowledge lists a package's source as NAMESPACE-NAME. The closing note no longer says the store plugins carry rerank or hybrid-weight options: no shipped store has either setting. A new eval case asks for a run-time-authored source. The token ratchet row moves 6639 -> 6695 by the measured remainder after the duplicates were paid down. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WV4cwPhGV4g9p1BGQaZbP
repo:objectstack#1 · os-elon-musk · session_016WV4cwPhGV4g9p1BGQaZbP
Fixes #37310
Clause-②: no
Metadata-protocol: none
维护者速读
name、逐个列出要索引的字段、可以不写存储;MCP 新建知识源暂不提供起始模板(模板里的占位对象和字段会被当成真实值存进去),等设置页表单从作者输入构建source后再加。What changes
skills/objectstack-ai/SKILL.md, § Knowledge Sources (RAG) (ADR-0161 K4, K5, K6 item 6; rows 3a and 3b as merged):knowledge_sourceitem: shipped in a package (knowledgeSources,*.knowledge-source.ts/.yml) or authored in Studio or over MCP.KnowledgeServicePlugin({ sources })andregisterSourceare a second door for the same schema, and one name is one source (K4 point 3). An item mounts the knowledge service and its store with norequires: ['knowledge'](knowledge_source: adapter becomes optional (the deployment's store), and a knowledge_source item mounts the knowledge service #37306, PR feat(knowledge): a knowledge source needs no adapter and no requires entry; it binds to the deployment's store #38026).name,label/description,adapter(optional; omitted ⇒ the deployment's store, else the only one registered, refused naming them when several and none is the deployment's),source.kind,source.object,source.content(an explicit non-empty list; why'*'is refused: embedding is egress, K5),source.metadataFields,source.where,source.split,refresh.onRecordChange,aiExposed. The old Hygiene column's advice (meaningful text only, never ids or system fields;wherekeeps drafts out) now lives in thecontentandwhererows, and sayscontent.manage_knowledge_sourcesbesidemanage_metadataand passes save-time admission.id→name,contentFields→content,embedding,vectorStore,adapterConfig,refresh.cron, and thefile/httparms with their four keys;os migrate meta --from 18for a stack, by hand for a registration in code.adapter: 'pgvector'(the deployment's store) and its comments; it is otherwise row 3a's block.split:strategyis required oncesplitis written (recursiveonly whensplitis omitted); the adapter-list aside is gone.topKis asearch_knowledgeargument; rerank and hybrid weights are options of the store's plugin.skills/objectstack-mcp-build/SKILL.md("An agent skill, tool or knowledge source | objectstack-ai") stays true: the section name is unchanged, so it is not edited.Not in this PR, on purpose (amendments 7221575164 and 7224082428): the five
os validate/ publish rule ids of PR #37971 (knowledge-source-object-unknown,knowledge-source-field-unknown,knowledge-source-object-not-searchable,knowledge-source-system-object-not-ai-readable,knowledge-source-field-never-indexed). #37971 is still open, so that part follows on this branch after it lands; the PR stays draft until then.skills/objectstack-ai/evals/skills-tools-knowledge.json. Case 3 (kb_article on PostgreSQL) and case 9 (policy_doc,markdownsplit) now expectnameandcontent, and forbid a writtencontentFields:key; case 3 also forbids a written wildcard (['*'],,['*'] }),embedding:andvectorStore:, and itstopKtoken becomestopK:(the key written) because the skill now namestopKas a search argument. New case 13 asks for a source that indexes "every text field" and expects an explicit list, the wildcard declined because embedding is egress, and no writtencontentFields:or wildcard.packages/spec/src/kernel/metadata-create-seeds.ts: unchanged (byte-identical tomain). Aknowledge_sourcecreate seed was tried and withdrawn at4c965f4a5e(comment 7229668414). Its object binding and content list sit insidesource, and the Studio create flow (buildCreateModeBody/seedPlaceholderKeysin app-shell'screateBody.ts) clears placeholder identity at the top level only, so it would have savedexample_object/example_fieldinto a new source: the objectui#12810 defect. No schema-valid seed avoids this, becausesource.objectand a non-emptycontent(K5) are required and nested.knowledge_sourcestays onKNOWN_UNSEEDED, whose comment now gives the reason: a seed waits until the Studio form (#37309, row 5) buildssourcefrom the author's input. The card allows this ("or the type stays onKNOWN_UNSEEDEDwith the reason").packages/runtime/src/domains/mcp-authoring.test.ts. One case beside the flow contract case, over the real protocol and the boot type registry:list_metadata_itemswithcontract: trueforknowledge_sourceserves nocreateSeed;contractPath/properties/source/properties/contentserves the content rule (minItems: 1,minLength: 1, a pattern that refuses*and admitsbody); the served schema carries noidorcontentFieldstombstone; a hand-written source with one object and one field saves as a draft; the same item withcontent: ['*'], with anid, or withcontentFieldsis refused422 INVALID_METADATA, the last two naming their tombstone's prescription ("usename", "usecontent"); nothing else is written.Token ratchet. The standing ruling, verbatim and untranslated: 「A:先削重复,余额按实测提高」 (ruling record 6513306068, letter B). Paid down first, in the same file: the wiring paragraph's package list, the old
source.kindHygiene column (folded into two rows), the example's four comments restating table rows and itsrefresh: { onRecordChange: true }line restating the default, and the split passage's adapter aside. The row moves 6609 → 6639, the measured remainder, pinned at the measurement.Tests
The lock was saturated: about 70 minutes of queueing, two dogfood runs ahead. One locked round ran at
3407f7fe6e; the second round was not reached. What was not measured locally is marked below, and CI runs it.Locked round at 3407f7f (VERDICT command-exit 0, held 365s)
pnpm turbo run build --filter='@objectstack/runtime^...' --concurrency=2: exit 0,Tasks: 41 successful, 41 total.metadata-create-seeds.test.ts(spec): the seed pin run here (Tests 20 passed (20)) belonged to the withdrawn seed; the file is back tomain's, so CITest Coreis the reading. Patch round at4c965f4a5e: the app-shellcreateBody.seedPlaceholders-12810.test.ts(red at19f3e118f2, 2 failures, unedited), the spec create-seeds test and the rewritten MCP case are NOT MEASURED locally (verify lock saturated); their inputs equalmain's, so CITest UIandTest Coreon this head are the evidence. Unlocked gates at4c965f4a5e, exit 0 each:check-skills-token-ratchet(6639/6639),check-empty-changeset,check-adr-0087-registration,check-changeset-no-major,check:nul-bytes,check:issue-citations,check:doc-authoring. The changeset no longer lists@objectstack/spec.pnpm --filter @objectstack/runtime exec vitest run --maxWorkers=2 src/domains/mcp-authoring.test.ts: exit 1,Tests 1 failed | 73 passed (74). The failing assertion is the new case's tombstone half: it expected the served schema to carry/properties/id, and the served schema drops tombstones (see Acceptance notes). Its content-rule and seed assertions, which run before it, passed. The tombstone half is rewritten in01cf7515c2to assert absence plus the save refusal. NOT MEASURED locally after that rewrite (the second locked round never acquired); CITest Coreruns it.pnpm --filter @objectstack/spec run check:yaml-examples: exit 0,19 tagged YAML example(s) across 1 file(s) validate.pnpm --filter @objectstack/spec run check:skill-docs: exit 0,Skill docs in sync.pnpm --filter @objectstack/spec run check:skill-refs: exit 0,10 generated files in sync with packages/spec. The generated skill references needed no regeneration: the section rewrite changes no reference input.pnpm --filter @objectstack/spec typecheck: exit 0.pnpm --filter @objectstack/runtime typecheck: exit 1.tsc --noEmitis clean.check:test-typechecknames 3 files this diff does not touch (boolean-written-spelling-row-scope.test.ts,meta-object-publish-column-changes.test.ts,organization-ownership-boot-guard.turso-remote.kernel.test.ts).mcp-authoring.test.tsis not among them. They are read here as the closure build's gaps (onlyruntime^...was built) and not as this diff's; CITypeScript Type Checkdecides.pnpm --filter @objectstack/spec run check:skill-examples: exit 3, PREREQUISITE NOT MET (the@objectstack/client-reactdist is outside the built closure). NOT MEASURED; CI runs it.Unlocked gates (35 derived families, each exit 0, at 3407f7f; the ratchet and nul-bytes re-run at 19f3e11)
node scripts/check-skills-token-ratchet.mjs: exit 0,skills/objectstack-ai/SKILL.md is 6639 tokens (ceiling 6639; headroom 0); with--self-testexit 0.check-adr-0087-registration(both forms),check-changeset-no-major,check-closing-keyword-parity(both),check-declaration-mirrors(both),check-empty-changeset(both),check-issue-citations,check-self-test-wired(both),docs-audit/check-affected-docs,docs-audit/check-drift-comment, andpnpm check:agent-test-spelling,changeset-gate-self-tests,closed-ceremony-text,corpus-claim-drift,cross-package-test-inputs,doc-authoring,issue-citations,keyed-text-bounds,nul-bytes,pm-skill-id-lint,published-files,ratchet-remedy-authority,role-word,skill-compatibility,skill-frame-sync,skill-identifier-liveness,skill-links,test-source-alias,tier-file-adoption.dispatch-gates --ran:116 derived, 38 run, 0 NOT-MEASURED, 78 UNRUN. That is a declared narrowing: the lock was saturated, and CI runs the 78.check-skill-frame-freshnessexit 0.check-dev-prereqsexit 1 ("69 of 110 workspace packages … not on disk"), which is the closure-only build and not a finding.Eval runner and the ablation (`skill-evals`, claude-code-cli 2.1.332, oauth login, served claude-opus-5-5)
Cases 3, 9 and 13 of
objectstack-ai/skills-tools-knowledge, both arms, one repeat each:main'sSKILL.md(8d34c4404f, hash88a20cb583), new cases (ablation)contentFields:written;name:,content:missingcontentFields:written;content:missingcontentFields:,['*'],andid: 'faqwritten; no egress reasonThe ablation restored
main'sSKILL.mdinto the working tree only (git restore --source=8d34c4404f,git hash-object=88a20cb583). The run ran, and thenHEAD's file came back (fc845724acboth on disk and atHEAD). An earlier run of case 13 on this text failed with-skill only on the token['*'], which a correct answer quoted while explaining the refusal. The forbidden token is now the written wildcard (['*'],/['*'] }), and the table above is after that change.Acceptance notes
git grep -n -E "contentFields|'\*'|adapter: 'ragflow'" skills/objectstack-ai) returns eight lines. InSKILL.md, three: thecontentrow ("'*'is refused") and two lines of the retired-keys paragraph. In the eval file, five: the reference answers of cases 3 and 13, which name both as retired, and themust_not_containlists of cases 3, 9 and 13, which forbid a writtencontentFields:and a written wildcard (['*'],,['*'] }). The card itself asks the eval to fail oncontentFieldsor'*', which puts the forbidden token on the assertion line. The reviewer decides whether those lines count as "naming a retired key as retired".adapter: 'ragflow'has no hit: Retire @objectstack/knowledge-ragflow: package, settings option, docs and skill mentions #37004 already removed it.itinside the existing real-protocoldescribeofmcp-authoring.test.ts, beside the flow contract case, because that describe holds the real-protocol harness (realProtocol,STUDIO_BASE). It is in the shared harness file, not a new file.retiredKey()tombstone ({ not: {} }; see the note inpackages/metadata-protocol/src/protocol-meta-type-schema.ts: the served schema publishes what an author MAY write). The prescription reaches an MCP author through the save refusal instead. The pin asserts both halves: the tombstone is absent from the served schema, and a save that writes the retired key is refused naming its replacement.VERDICT overlap exit 1.origin/main, chore: version packages (next) #38032 and feat(metadata-core)!: a knowledge source is saved only on a deployment that mounts the knowledge service #38013 merge cleanly. docs(skills): objectstack-data and objectstack-automation SKILL.md become routers #36158 (a draft last updated 2026-11-25) conflicts inscripts/check-skills-token-ratchet.mjs. That conflict is docs(skills): objectstack-data and objectstack-automation SKILL.md become routers #36158's own againstorigin/main:git merge-tree origin/mainwith docs(skills): objectstack-data and objectstack-automation SKILL.md become routers #36158's head conflicts in the same file, and every conflict hunk is at line 798 or later, away from this branch's hunk near line 453. Reported here, not resolved.Verification
Files to read first, by risk:
skills/objectstack-ai/SKILL.md§ Knowledge Sources (RAG): theadapterandcontentrows and the retired-keys paragraph.packages/spec/src/kernel/metadata-create-seeds.ts: theKNOWN_UNSEEDEDreason forknowledge_source(no seed).packages/runtime/src/domains/mcp-authoring.test.ts: the new contract case.Two-minute check:
node scripts/check-skills-token-ratchet.mjs. Expectskills/objectstack-ai/SKILL.md is 6639 tokens (ceiling 6639; headroom 0).Readings:
skills/objectstack-ai/SKILL.md464 → 469 lines, 26462 → 26581 bytes (6609 → 6639 priced tokens). Every publishedSKILL.mdsummed: 4936 → 4941 lines, 261366 → 261485 bytes (65342 → 65372 tokens). The eval file is 125 → 137 lines and 13611 → 15185 bytes; eval fixtures are measured, not ratcheted.Generated by Claude Code